package simri.desktop.auxiliar;

import simri.comunicacao.usb.ComunicacaoUSB;

public class TEnviarDados extends Thread implements Runnable{
	
	private ComunicacaoUSB com;
	private Boolean conect;
	private long temp;
	
	public TEnviarDados(ComunicacaoUSB c, boolean conect, long temp){
		com = c;
		this.conect = conect;
		this.temp = temp;
	}
	@Override
	public void run(){
		while(conect){
			try {
				Thread.sleep(temp);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			com.HabilitarEscrita();
			com.EnviarUmaString("abcdefghijklmnopqrstuvwxyz");
			com.HabilitarLeitura();
		}
	}
	

}
